define(['app'], function(app) {
	'use strict';

	//实例化方法
	var factory = function(Http) {
		//返回信息
		return {
			//获取详细数据
			product_detail: function(act_id, goods_id,product_id,callback) {
				Http.post({
					method: 'marketing.notice.detail',
					act_id: act_id,
					goods_id:goods_id,
					product_id:product_id
				}, function(result) {
					if(callback)
						callback(result);
				}, function(e) {

				}, function() {

				})
			},
			buy:function(goods_id,products_id,num,act_id,callback){
				Http.post({
					method:'marketing.notice.checkOut',
					goods_id:goods_id,
					product_id:products_id,
					num:num,
					act_id:act_id
				},function(result){
					if(callback)
					callback(result);
				})
			},
			//客服列表
			//客服QQ与联系方式
			contact_show: function(store_id,callback) {
				Http.post({
					method: 'shop.cusphone.getlist',
					store_id:store_id
				}, function(result) {
					//函数回调
					if(callback)
						callback(result.result);
				}, function(e) {

				}, function() {

				});
			}
		};
	}

	factory.$inject = ['Http'];
	return app.registerService("NewnoticeDetail", factory);
});